<script setup lang="ts">
withDefaults(
  defineProps<{
    corner?: number | string;
  }>(),
  {}
);
const emit = defineEmits(["click"]);
</script>

<template>
  <view class="icon" @click="emit('click')">
    <view v-if="corner" class="corner">{{ corner }}</view>
    <image
      src="https://wealth-1311286543.cos.ap-guangzhou.myqcloud.com/taoshe/static/icon_car.png"
      class="car"
    ></image>
  </view>
</template>

<style lang="scss" scoped>
.icon {
  position: absolute;
  width: 80rpx;
  height: 80rpx;
  border-radius: 100%;
  right: 48rpx;
  bottom: 40rpx;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ff5e5e;
  .corner {
    position: absolute;
    top: 0;
    right: -10rpx;
    background: #333333;
    border-radius: 100%;
    font-size: 10px;
    width: 35rpx;
    height: 35rpx;
    text-align: center;
    line-height: 35rpx;
    color: #fff;
  }
  .car {
    width: 24px;
    height: 24px;
  }
}
</style>
